home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Precision Software Appli…tions Silver Collection 4
/
Precision Software Applications Silver Collection Volume 4 (1993).iso
/
stats
/
chadyn.exe
/
YDEFINES.H
< prev
next >
Wrap
Text File
|
1988-11-30
|
7KB
|
232 lines
/********************* YDefines.h **********************************/
/* SEE YCompilr.h for:
#define INITOVLY
#define OVERLAY
#define overlay(x)
#define overlay_init(x)
#define INTERRUPT */
#define CORECOLS 960
/* Width of the internal memory's picture =*/
/* The number of bits wide = */
/* width in bits of the printer output */
#define SCRNCOLS 640
/* Width of the crt screen. The program */
/* assumes this is no bigger than CORECOLS */
#define COREROWS 68
/* About the max num of printer lines */
/* that are permited in 64 K */
#define SCRNROWS 200
/* height (bits) of crt screen */
#define CORESIZE 65280
/* use in yplot.c; should = CORECOLS*COREROWS; it
has to be defined separately because it is used in a
dimension statement */
#define SELECT 15 /* used in y.c */
#define ALL_Y 210 /* used in y.c;
needs 200 more for YY stack */
#define EQTNS0 21 /* max number of equations for main trajectory vec */
#define EQUATIONS 21 /* max equations for storage vectors */
#define NUM_Y 10 /* 210/21 = number of vectors in y[] */
#define YES 1
#define NO 0
#define KILL 0
#define PICKMAP 1
#define SETPARAM 2
#define PROCESS 3
#define ESC 27
#define LINEFEED 10 /* used inparsing routine in YMAPS.C */
#ifdef X11
/* There is no core copy in the current X11 version of the code */
#define clearp()
#define XK_MISCELLANY
#include <X11/keysymdef.h>
#define UPARROW XK_Up
#define DNARROW XK_Down
#define RTARROW XK_Right
#define LTARROW XK_Left
#define UP XK_Up
#define DOWN XK_Down
#define LEFT XK_Left
#define RIGHT XK_Right
#define F1 XK_F1
#define F2 XK_F2
#define F3 XK_F3
#define F4 XK_F4
#define F5 XK_F5
#define F6 XK_F6
#define F7 XK_F7
#define F8 XK_F8
#define F9 XK_F9
#define F10 XK_F10
#ifdef SUN /* Function keys for Sun keyboards */
#define End XK_L1
#define PgDn XK_L2
#define Home XK_L3
#define PgUp XK_L4
#define ALT_0 XK_L5
#else /* Hope we have enough function keys */
#define End XK_F11
#define PgDn XK_F12
#define Home XK_F13
#define PgUp XK_F14
#define ALT_0 XK_F15
#endif /* SUN */
#else
#define UPARROW 24
#define DNARROW 25
#define RTARROW 16
#define LTARROW 17 /* should be 27 but that doesn't work because it is ESC */
#define UP -72
#define DOWN -80
#define LEFT -75
#define RIGHT -77
#define End -79
#define PgDn -81
#define Home -71
#define PgUp -73
#define ALT_O -24
#define F1 -59
#define F2 -60
#define F3 -61
#define F4 -62
#define F5 -63
#define F6 -64
#define F7 -65
#define F8 -66
#define F9 -67
#define F10 -68
/***************************************************
Some ascii codes -- see BASIC manual appendix G
48-57: 0,1,...,9
65-90: A,...,Z
97-122: a,...,z
Notice above defined codes 71,72,73,75,77,79,80,81
G H I K M O P Q
Some Extended Codes --preceeded by a character 0
120-131: Alt 1,2,...,0,-,=
59-68: F1-F10
84-93: SHIFTED F1-F10
94-103 Ctrl F1-F10
104-103 Alt F1-F10
16-25 Alt Q,W,E,R,T,Y,U,I,O,P
30-38 Alt A S D F G H J K L
44-50 Alt Z X C V B N M
****************************************************/
/* ASCII character codes can be found in Microsoft C Compiler manual, p. 175 */
#endif /* X11 */
#define ON 1
#define OFF 0
#define CTRL_B 2
#define ESC 27
#define BIGCROSS 0
#define SMALLCROSS 1
#define SCRN 1 /* used to designate which cross is being drawn */
#define CORE 2
#define CROSSWIDTH (corecols/120)
/* =8 for core crosses -- see yintrpt.c and yplot.c */
#define CROSSHEIGHT ((corerows*8)/136) /* = 68/17 = 4 */
#define SCRNCROSSWIDTH (scrncols/40) /* big cross screen width */
#define SCRNCROSSHEIGHT (scrnrows/25) /* big cross screen height */
/* the following are used for keeping declaring vectors in YPLOT that are
used for keeping track of colors of pixels in crosses */
#define TWICESCRNCROSSWIDTH 64 /* ( >2*SCRNCOLS/40) big cross screen width */
#define TWICESCRNCROSSHEIGHT 64/* ( > 2*SCRNROWS/25) big cross screen height */
#define USTEP .001
/* for unstable manifold computations; should
be smaller for finer grids */
#define ABS(x) ( (x)>0 ? x : -x) /* for yplot and yintrpt and ? */
/* The following are for YCases and YCases2 */
#define MAX(a,b) (a > b) ? a : b
#define TEST(x) if(strcmp(CodeName,x) == 0)
#define TEST2(x,y) if(strcmp(CodeName,x) == 0||strcmp(CodeName,y) == 0)
#define TESTMAP(x) if(strcmp(MapName,x) == 0)
#define TESTMAP2(x) if(strcmp(map,x) == 0 || strcmp(map, "all") == 0)
#define SCREEN (SCREEN_MENU || SCREEN_PROCESS)
#define SCREEN_MENU (level <=2 && coloncommand == NO && input==StInput)
#define SCREEN_PROCESS (level >= PROCESS && printer > 0 )
/* if both conditions above are satisfied, then text is printed on the
screen */
/* the following two are for ylyap.c for newton */
#define VECDIM 4 /* an upper bound on the dimension for vector in gauss */
#define MATDIM 16 /* = VECDIM*VECDIM */
/* The following are for use in Y.C */
#define PLOTXY 0
#define PLOTALL 2
#define PLOTXX 4
#define PLOTRY 6
#define PLOTXR 8
#define PLOTCIRC 100
#ifndef X11
/* the following are for plotting tic marks */
#define HORIZSCRN 3
#define VERTSCRN 4
#define HORIZCORE 5
#define VERTCORE 6
#endif /* X11 */
#define EPSONBW 1
#define EPSONCOLOR 2
/* Additions by Eric Kostelich (mnemonics for screen sections and ScrnSec) */
#define UPPERLEFT 1
#define UPPERRIGHT 2
#define LOWERLEFT 3
#define LOWERRIGHT 4
#define WHOLESCREEN 0
/* Additions by Eric Kostelich to handle input of various values */
#define SETVALUE 1
#define CHECKSET 0
/* Addition by Eric for defining the maximum length of an input text line */
#define MAXCHAR 255
#ifndef MS
/* Useful extremum operators added by Eric Kostelich */
#define max(x, y) ((x) < (y) ? (y) : (x))
#define min(x, y) ((x) < (y) ? (x) : (y))
/* For blanking and plotting areas on the screen - moved from yplot.c */
#define BLANK 0
#define COLOR 1
#endif
/* For handling printers */
#ifndef MS
#define stdprn StPrint
#endif
/* The next section is for handling math function differences on Unix
* systems */
#ifdef TESTING
#ifndef UNIX
#define fabs dabs /* use the dabs() in ytools.c */
#endif
#endif
/* The largest integer generated by random() on Unix systems */
#ifdef UNIX
#define MAXRAND ((1L << 31) - 1)
#define COMMANDS_DOC "commands.doc"
#else
#define COMMANDS_DOC "COMMANDS.DOC"
#endif
#ifdef X11
typedef struct {int x, y;} POINT; /* an integer point */
#endif
/************************* End of YDefines.h *****************************/